package com.example.finalproject.User;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Repository
public interface UserRepository {
    //注册添加新用户
    @Insert("insert into users(userName,userPassWord,email) values(#{userName},#{userPassWord},#{email})")
    public void insertUser(User user);
    //寻找用户,登录时以及注册时
    @Select("select * from users where userName=#{userName}")
    public User selectUserByName(String userName);
}
